package com.epoint.mobileoa.ui.todolist;

import java.util.HashMap;

import android.os.Message;

import com.epoint.mobileoa.bizlogic.SuperView;
import com.epoint.mobileoa.bizlogic.Task;
import com.epoint.mobileoa.http.HttpHelp;
import com.epoint.mobileoa.tools.LogHelp;

/**
 * @author liyc
 * @time 2012-3-16 下午4:28:45
 * @annotation
 */
public class ShouwenDealTask extends Task {

	public ShouwenDealTask(SuperView con, HashMap<String, Object> param) {
		super(con, param);
	}

	@SuppressWarnings({ "unchecked", "rawtypes" })
	@Override
	public void exectue(Message mess) throws Exception {

		HashMap<String, String> params = new HashMap<String, String>();
		params.put("zhusongrenguid", getParam().get("zhusongrenguid")
				.toString());
		params.put("chaosongrenguid", getParam().get("chaosongrenguid")
				.toString());
		params.put("messageitemguid", getParam().get("messageItemGuid")
				.toString());
		params.put("operatorguid", getParam().get("operatorGuid") == null ? ""
				: getParam().get("operatorGuid").toString());
		params.put("pviguid", getParam().get("pviGuid") == null ? ""
				: getParam().get("pviGuid").toString());
		params.put("workitemguid", getParam().get("workItemGuid") == null ? ""
				: getParam().get("workItemGuid").toString());
		params.put(
				"operationguid",
				getParam().get("operationGuid") == null ? "" : getParam().get(
						"operationGuid").toString());
		params.put(
				"operatestatus",
				getParam().get("operateStatus") == null ? "" : getParam().get(
						"operateStatus").toString());
		params.put(
				"handleopinion",
				getParam().get("handleOpinion") == null ? "" : getParam().get(
						"handleOpinion").toString());
		params.put(
				"transitionguid",
				getParam().get("transitionGuid") == null ? "" : getParam().get(
						"transitionGuid").toString());
		params.put("typecode", getParam().get("typecode").toString());

		String bs = HttpHelp.post(getCon().fp.getSeamurl()
				+ "?requestType=GongwenDealBtn", params, null);
		LogHelp.LogI("公文处理返回值=" + bs);
		HashMap param = new HashMap();
		param.put("type", "deal");
		param.put("bs", bs);
		setMessageToRefreshUI(mess, getCon(), param);
	}

}
